package com.bijiawang.search.dao;

import com.bijiawang.search.pojo.Goods;
import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
import us.codecraft.webmagic.pipeline.Pipeline;

import java.util.ArrayList;
import java.util.Iterator;

public class PipelineDao implements Pipeline {
    public ArrayList<Goods> goodArrayList=null;
    public String price = null;
    @Override
    public void process(ResultItems resultItems, Task task) {
         goodArrayList = resultItems.get("List");
         price = resultItems.get("price");
    }

    public  ArrayList<Goods> getList(){
        return goodArrayList;
    }

    public String getPrice() {
        return price;
    }
}
